from word.service.handle import read_word, read_excel, write_word
from excel.service.data import excel_data
"""读取word表格"""
# 要读取的列
title = ["姓名","出生年月","身高","工作单位","联系电话","学历","E-mail"]
# 读取[测试报名表]下的word文件并写出到报名汇总.xlsx表格中
# read_word(r"resource/测试报名表",title).write(r"resource/报名汇总.xlsx")
# 读取[测试报名表]下的excel文件并写出到报名汇总.xlsx表格中
read_excel("resource/测试报名表",title).write(r"resource/报名汇总2.xlsx")

"""写入word表格"""
# 读取[报名汇总.xlsx]的数据并使用[模板]填写到指定文件夹[报名表生成]中
# write_word(excel_path=r"resource/报名汇总.xlsx", template=r"resource/报名表模板.docx",
#             dir="resource/报名表生成")
# 可以自定义生成的[文件名]
# write_word(excel_path=r"resource/报名汇总.xlsx", template=r"resource/报名表模板.docx",
#             dir="resource/报名表生成",
#             file_name="{姓名}-{工作单位}-报名表.docx")
